CREATE TABLE [dbo].[TTTIPO_COND]
(
[CO_COND_PAGO] [dbo].[TD_VC_003] NOT NULL,
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[DE_COND] [dbo].[TD_VC_050] NOT NULL,
[TI_COND] [dbo].[TD_VC_003] NOT NULL,
[NU_DIAS] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TTTIPO_CO__NU_DI__24B26D99] DEFAULT ((0)),
[ST_COTI_ANTI] [dbo].[TD_VC_001_SINO] NULL,
[PC_DCTO_COND] [dbo].[TD_NU_009_004] NULL CONSTRAINT [DF__TTTIPO_CO__PC_DC__269AB60B] DEFAULT ((0)),
[PC_CAST_COND] [dbo].[TD_NU_009_004] NULL CONSTRAINT [DF__TTTIPO_CO__PC_CA__278EDA44] DEFAULT ((0)),
[ST_CTCP] [dbo].[TD_VC_001_SINO] NOT NULL,
[ST_CTCB] [dbo].[TD_VC_001_SINO] NOT NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTTIPO_CO__CO_US__2A6B46EF] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTTIPO_CO__FE_US__2B5F6B28] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTTIPO_CO__CO_US__2C538F61] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTTIPO_CO__FE_US__2D47B39A] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTTIPO_COND] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_CO__ST_CO__25A691D2] CHECK NOT FOR REPLICATION (([ST_COTI_ANTI]='N' OR [ST_COTI_ANTI]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_COND] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_CO__ST_CT__2882FE7D] CHECK NOT FOR REPLICATION (([ST_CTCP]='N' OR [ST_CTCP]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_COND] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_CO__ST_CT__297722B6] CHECK NOT FOR REPLICATION (([ST_CTCB]='N' OR [ST_CTCB]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_COND] ADD CONSTRAINT [PK__TTTIPO_C__5876C22006B7F65E] PRIMARY KEY CLUSTERED  ([CO_COND_PAGO], [CO_EMPR]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTTIPO_COND] ADD CONSTRAINT [FK__TTTIPO_CO__CO_EM__57C7FD4B] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMEMPR] ([CO_EMPR])
GO
GRANT SELECT ON  [dbo].[TTTIPO_COND] TO [public]
GRANT INSERT ON  [dbo].[TTTIPO_COND] TO [public]
GRANT DELETE ON  [dbo].[TTTIPO_COND] TO [public]
GRANT UPDATE ON  [dbo].[TTTIPO_COND] TO [public]
GO
